package com.ruoyi.quartz.task;

import com.ruoyi.oa.service.SyncOaDeptDataService;
import com.ruoyi.oa.service.SyncOaStaffDataService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 定时任务调度测试
 * 
 * @author ruoyi
 */
@Component("oaTask")
public class OaTask
{
    /**
     * 同步部门数据service
     */
    @Resource
    private SyncOaDeptDataService syncOaDeptDataService;

    /**
     * 同步用户数据service
     */
    @Resource
    private SyncOaStaffDataService syncOaStaffDataService;


    /**
     * 执行
     */
    public void executeOaTask()
    {
        System.out.println("执行同步oa的部门数据");
        syncOaDeptDataService.syncDept();

        System.out.println("执行同步oa的人员数据");
        syncOaStaffDataService.syncStaff();

    }
}
